From: Michael Albinus Date: Sun, 28 Feb 2010 11:36:39 +0000 (+0100) Subject: * net/tramp.el (tramp-handle-write-region): START can be a string. X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1~1^2~324^2~8466 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=740f53797146ccadd4eb8be9cb813985b97b85a3;p=emacs.git * net/tramp.el (tramp-handle-write-region): START can be a string. Take care in the checks. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ae5709ee367..1238b936f52 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2010-02-28 Michael Albinus + + * net/tramp.el (tramp-handle-write-region): START can be a string. + Take care in the checks. Reported by Dan Davison + . + 2010-02-28 Michael Albinus * net/dbus.el (dbus-introspect, dbus-get-property) diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 102117f82e9..0957c78eddf 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -5045,11 +5045,12 @@ Returns a file name in `tramp-auto-save-directory' for autosaving this file." ;; encoding function, then that is used for encoding the ;; contents of the tmp file. (cond - ;; `rename-file' handles direct copy and out-of-band methods. + ;; `copy-file' handles direct copy and out-of-band methods. ((or (tramp-local-host-p v) (tramp-method-out-of-band-p - v (- (or end (point-max)) (or start (point-min))))) - (if (and (= (or end (point-max)) (point-max)) + v (nth 7 (file-attributes tmpfile)))) + (if (and (not (stringp start)) + (= (or end (point-max)) (point-max)) (= (or start (point-min)) (point-min)) (tramp-get-method-parameter method 'tramp-copy-keep-tmpfile))